Modern computer networks resemble a web of communication lines that meet at a plurality of node points, such that any one node point may be reached from another node point along many different paths. Different types of devices are connected to the network at the nodes, to perform functions associated with network traffic or simply to send and receive data from the network. Some of the devices are routers, which forward network traffic along optimized paths. Other devices may include any type of network enabled device, which is able to communicate with other networked devices by exchanging data over the network.
Routers manufactured by the Cisco Systems Corporation are widely used. Cisco routers are managed by a Command Line Interface (CLI), which is a collection of text commands that are typically entered by the user at a command prompt, using a computer terminal. In general, routers are formed by powerful microprocessors, memory units and command consoles which allow a user to configure the manner in which the router directs the flow of network traffic according to the computed optimal paths. Other devices connected to the network may be configured so that they are capable of interacting with routers, and are often designed with CLI command sets that are compatible with the Cisco Internetworks operating system. In particular, applications used to remotely manage these devices, as well as the routers themselves, may be designed to be compatible with the Cisco CLI command set, to provide familiar commands and software organization to developers used to work with Cisco systems.
On occasions, the operation of the networked devices is disrupted by an abnormal condition, an unexpected event or other abnormality, and the networked device stops functioning normally. This abnormal condition, generally called a “crash”, often requires a restart of the networked device in order to be resolved. The user may also attempt to improve the performance of the device by changing configurations, in which case each successive configuration can be referred to as a “candidate version” of the final desired configuration. It is often valuable to return the device to a known valid configuration, either in response to the conditions of the network that led to the failure, or to back out of a “candidate version” configuration known to be flawed.
The CLI commands used to set a device to one of these various configurations are typically placed into a script file, due to the complexity and volume of commands required to fully set a device's configuration. It is useful thus to generate a script file for an existing configuration of the device, so that the device can later be returned to that configuration. Generating such a script file typically is a complex and time consuming process, which needs to be repeated every time changes are made to the device's features or to the CLI command set.